<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js中的字符串类型</title>
</head>
<body>
    <script type="text/javascript">
            var name="南宫婉  韩立"
            var v1=name.length
            var v2=name[0]// name.charAt(
            var v3=name.trim()
            var v4=name.substring(1,4)
            var v5=name.charAt(1)

            console.log(v1)
            console.log(v2)
            console.log(v3)
            console.log(v4)
            console.log(v5)
    </script>
</body>
</html>